package com.ruoyi.member.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.db.mapper.MemberAuthRecordInfoMapper;
import com.ruoyi.db.domain.MemberAuthRecordInfo;
import com.ruoyi.member.service.IMemberAuthRecordInfoService;

/**
 * 用户认证历史Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-13
 */
@Service
@DataSource(DataSourceType.SLAVE)
public class MemberAuthRecordInfoServiceImpl implements IMemberAuthRecordInfoService 
{
    @Autowired
    private MemberAuthRecordInfoMapper memberAuthRecordInfoMapper;

    /**
     * 查询用户认证历史
     * 
     * @param id 用户认证历史主键
     * @return 用户认证历史
     */
    @Override
    public MemberAuthRecordInfo selectMemberAuthRecordInfoById(Long id)
    {
        return memberAuthRecordInfoMapper.selectMemberAuthRecordInfoById(id);
    }

    /**
     * 查询用户认证历史列表
     * 
     * @param memberAuthRecordInfo 用户认证历史
     * @return 用户认证历史
     */
    @Override
    public List<MemberAuthRecordInfo> selectMemberAuthRecordInfoList(MemberAuthRecordInfo memberAuthRecordInfo)
    {
        return memberAuthRecordInfoMapper.selectMemberAuthRecordInfoList(memberAuthRecordInfo);
    }

    @Override
    public List<Map<String, Object>> selectMemberAuthRecordInfoMapList(MemberAuthRecordInfo memberAuthRecordInfo) {
        return memberAuthRecordInfoMapper.selectMemberAuthRecordInfoMapList(memberAuthRecordInfo);
    }

    /**
     * 新增用户认证历史
     * 
     * @param memberAuthRecordInfo 用户认证历史
     * @return 结果
     */
    @Override
    public int insertMemberAuthRecordInfo(MemberAuthRecordInfo memberAuthRecordInfo)
    {
        memberAuthRecordInfo.setCreateTime(DateUtils.getNowDate());
        return memberAuthRecordInfoMapper.insertMemberAuthRecordInfo(memberAuthRecordInfo);
    }

    /**
     * 修改用户认证历史
     * 
     * @param memberAuthRecordInfo 用户认证历史
     * @return 结果
     */
    @Override
    public int updateMemberAuthRecordInfo(MemberAuthRecordInfo memberAuthRecordInfo)
    {
        memberAuthRecordInfo.setUpdateTime(DateUtils.getNowDate());
        return memberAuthRecordInfoMapper.updateMemberAuthRecordInfo(memberAuthRecordInfo);
    }

    /**
     * 批量删除用户认证历史
     * 
     * @param ids 需要删除的用户认证历史主键
     * @return 结果
     */
    @Override
    public int deleteMemberAuthRecordInfoByIds(Long[] ids)
    {
        return memberAuthRecordInfoMapper.deleteMemberAuthRecordInfoByIds(ids);
    }

    /**
     * 删除用户认证历史信息
     * 
     * @param id 用户认证历史主键
     * @return 结果
     */
    @Override
    public int deleteMemberAuthRecordInfoById(Long id)
    {
        return memberAuthRecordInfoMapper.deleteMemberAuthRecordInfoById(id);
    }
}
